# 面向对象
# 类
class Student():
  sum = 0

  # 初始化 有点js的constructor
  # argus self.__dict__ 所有参数的值
  def __init__(self, name, age):
    self.name = name
    self.age = age
    self.__score = 0
    
  # 实例方法
  def do_homework(self):
    print('homework')

  def marking(self, score):
    if score < 0:
      return print('分数不能低于0分')
    self.__score = score
    print(self.name + '同学分数为:' + str(self.__score))

  # 类方法
  @classmethod
  def plus_sum(cls):
    pass

  # 静态方法
  @staticmethod
  def add(x, y):
    pass

student1 = Student('风清扬', 18)
student2 = Student('妈卖批', 18)

student1.marking(100)
student1.__score = -1
print(student1.__dict__)